package chen.dev.learn.service.impl;

import chen.dev.learn.service.SpaService;
import org.springframework.stereotype.Service;

import java.util.Random;
import java.util.concurrent.TimeUnit;

/**
 * 服务A实现
 *
 * @author chensj
 * @date 2020-04-20 21:35
 */
@Service
public class SpaPrincessA implements SpaService {

    private Random random = new Random();
    private int bound = 5;


    @Override
    public void fullBodyMassage(String customer) {
        try {
            TimeUnit.SECONDS.sleep(random.nextInt(bound));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println(customer + "享受完fullBodyMassage服务");
    }

    @Override
    public void aromaOilMassage(String customer) {
        try {
            TimeUnit.SECONDS.sleep(random.nextInt(bound));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println(customer + "享受完aromaOilMassage服务");
    }
}
